﻿<%@ Page Language="C#" MasterPageFile="~/Default.master" AutoEventWireup="true" CodeFile="visitd.aspx.cs" Inherits="visitd" Title="PatientCRM" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

    <div style="width: 100%;" class="box">
        <div class="topleft">
            <div class="topright">
                <div class="innerright">
                    <h4>
                        <asp:Localize ID="lTitle" meta:resourcekey="resTitle" runat="server" />  
                    </h4>
                </div>
                <div class="innerleft">
                    <h4>
                       <asp:Localize ID="lLinksTitle" meta:resourcekey="resLinksTitle" runat="server" />
                    </h4>
                </div>
                <div class="r">
                </div>
            </div>
        </div>
        <div class="mid">
            <div class="innerleft">
                <div>
                    <a href="Default.aspx">
                        <asp:Localize ID="lLinks1" meta:resourcekey="resLinks1" runat="server" />    
                    </a>
                    -
                    <a href="PatientInfo.aspx?action=new">
                        <asp:Localize ID="lLinks2" meta:resourcekey="resLinks2" runat="server" />    
                    </a>
                    -
                    <a href="questiond.aspx">
                        <asp:Localize ID="lLinks3" meta:resourcekey="resLinks3" runat="server" />    
                    </a>
                </div>
            </div>
            <div class="innerright">
                <div></div>
            </div>
            <div class="r">
            </div>
        </div>
        <div class="bottomleft">
            <div class="bottomright">
            </div>
        </div>
    </div>
    
    <div class="s"></div>
    
    
    <div class="langDir">
        
        <span><asp:Localize ID="lPatientName" meta:resourcekey="resPatientName" runat="server" /></span>
        <asp:LinkButton ID="lbPatientName" runat="server" />
        
        
        <div class="s"></div>
        
        <h4><asp:Localize ID="lFileInfo" meta:resourcekey="resFileInfo" runat="server" /></h4>
        
        <div id="q-formcontainer">
        <div id="divQuestionArea" style="border:0;" runat="server">
             <asp:Repeater ID="rQuestions" runat="server">
                <ItemTemplate>
                  <div class="langDir">
                    <asp:Label ID="lblRepeaterId" Text='<%# Bind("Id") %>' runat="server"></asp:Label>
                    <label><%# Eval("QuestionDesc")%></label>
                    <%# Eval("AnswerDesc") %>
                  </div>
                </ItemTemplate>
             </asp:Repeater>
        </div>
    </div>
        
        
        <div class="s"></div>
        
        
        <div class="s"></div>
        
        <span><asp:Localize ID="lVisitDesc" meta:resourcekey="resVisitDesc" runat="server" /></span>
        <br />
        <asp:TextBox ID="txtVisit" Width="550" Height="300" TextMode="MultiLine" runat="server" />
        
        <div class="s"></div>
        
        <div class="cssButtonSize-smallest cssButtonSide-lang">
            <div class="cssButton cssButtonColor-orange">
                <div class="cssButtonOuter">
                    <div class="cssButtonMiddle">
                        <div class="cssButtonInner">
                            <asp:Button ID="btnSave" runat="server" meta:resourcekey="resBtnSave" 
                                onclick="btnSave_Click" />
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    
    <div class="s"></div>
    
    <hr />
    
    <div class="s"></div>
    
    <div class="langDir">
        <h4><asp:Localize ID="lVisitHistory" meta:resourcekey="resVisitHistory" runat="server" />    </h4>
        
        <div id="long-formcontainer">
            
            
            <mani:PagingGridView ID="gvVisitHistory" runat="server" VirtualItemCount="-1" PageSize="15"
                AllowPaging="True" AutoGenerateColumns="False" DataKeyNames="ID" 
                OnPageIndexChanging="gvVisitHistory_PageIndexChanging" 
                onrowdeleting="gvVisitHistory_RowDeleting" OnRowDataBound="gvVisitHistory_RowDataBound"
                AllowSorting="True" meta:resourcekey="gvVisitHistoryResource">
                
                <PagerSettings Mode="NumericFirstLast"></PagerSettings>
                <Columns>
                    <asp:BoundField DataField="Id" meta:resourcekey="resGvVisitHistoryC1" SortExpression="Id" />
                    <asp:TemplateField meta:resourcekey="resGvVisitHistoryC2" SortExpression="SubmitDate">
                        <ItemTemplate>
                            <%# MyPersianDate.DateTimeToPersian(Eval("VisitDate"))%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="Description" meta:resourcekey="resGvVisitHistoryC3" />
                    <asp:TemplateField>
                        <ItemTemplate>
                            <a href='VisitInfo.aspx?action=edit&id=<%# Eval("Id") %>'>
                                <img src="img/edit.gif" alt="" style="border: 0;" />
                            </a>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <ItemTemplate>
                            <asp:LinkButton ID="lbDeleteVisit" runat="server" CausesValidation="False" CommandName="Delete">
                                <img src="img/delete.gif" alt="" style="border:0;" />
                            </asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </mani:PagingGridView>
            
        </div>
    </div>
    
    
</asp:Content>

